package com.eric.code.oauth2.model;

import com.jfinal.plugin.activerecord.Model;

import java.util.Date;

/**
 * Created by eric on 17-3-21.
 */
public class User extends Model<User> {

    public long getId(){
        return get("id");
    }

    public void setUserName(String userName){
        set("username",userName);
    }
    public String getUserName(){
        return get("username");
    }

    public void setPassword(String password){
        set("password",password);
    }
    public String getPassword(){
        return get("password");
    }

    public void setName(String name){
        set("name",name);
    }
    public String getName(){
        return get("name");
    }

    public void setEmail(String email){
        set("email",email);
    }
    public String getEmail(){
        return get("email");
    }

    public void setCreateAt(Date date){
        set("createAt",date);
    }
    public Date getCreateAt(){
        return get("createAt");
    }

    /**
     * 设置用户类型 0 普通用户 ,1 超级用户
     * @param type
     * @return
     */
    public void setType(int type){
        set("utype",type);
    }

    public int getType(){
        return get("utype");
    }

}
